package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreRawMaterialsSummaryMapper;
import com.ruoyi.system.domain.StoreRawMaterialsSummary;
import com.ruoyi.system.service.IStoreRawMaterialsSummaryService;

/**
 * 门店原料 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-27
 */
@Service
public class StoreRawMaterialsSummaryServiceImpl implements IStoreRawMaterialsSummaryService
{
    @Autowired
    private StoreRawMaterialsSummaryMapper storeRawMaterialsSummaryMapper;

    /**
     * 通过id查询门店原料
     *
     * @param id 门店原料主键
     * @return 门店原料
     */
    @Override
    public StoreRawMaterialsSummary selectStoreRawMaterialsSummaryById(Long id)
    {
        return storeRawMaterialsSummaryMapper.selectStoreRawMaterialsSummaryById(id);
    }

    /**
     * 通过门店名称查询门店原料列表
     *
     * @param storeName 门店名称
     * @return 门店原料
     */
    @Override
    public List<StoreRawMaterialsSummary> selectStoreRawMaterialsSummaryListByName(String storeName)
    {
        return storeRawMaterialsSummaryMapper.selectStoreRawMaterialsSummaryListByName(storeName);
    }

    /**
     * 新增门店原料
     *
     * @param storeRawMaterialsSummary 门店原料
     * @return 结果
     */
    @Override
    public int insertStoreRawMaterialsSummary(StoreRawMaterialsSummary storeRawMaterialsSummary)
    {
        return storeRawMaterialsSummaryMapper.insertStoreRawMaterialsSummary(storeRawMaterialsSummary);
    }

    /**
     * 修改门店原料
     *
     * @param storeRawMaterialsSummary 门店原料
     * @return 结果
     */
    @Override
    public int updateStoreRawMaterialsSummary(StoreRawMaterialsSummary storeRawMaterialsSummary)
    {
        return storeRawMaterialsSummaryMapper.updateStoreRawMaterialsSummary(storeRawMaterialsSummary);
    }

    /**
     * 通过id批量删除门店原料信息
     *
     * @param ids 需要删除的门店原料主键
     * @return 结果
     */
    @Override
    public int deleteStoreRawMaterialsSummaryByIds(Long[] ids)
    {
        return storeRawMaterialsSummaryMapper.deleteStoreRawMaterialsSummaryByIds(ids);
    }

    /**
     * 通过id删除门店原料信息
     *
     * @param id 门店原料主键
     * @return 结果
     */
    @Override
    public int deleteStoreRawMaterialsSummaryById(Long id)
    {
        return storeRawMaterialsSummaryMapper.deleteStoreRawMaterialsSummaryById(id);
    }
}
